﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExaminationSystem.EntityFrameworkCore
{
    public class ExaminationSystemDesignFactory : IDesignTimeDbContextFactory<ExaminationSystemDbContext>
    {
        public ExaminationSystemDbContext CreateDbContext(string[] args)
        {
            var builder = new DbContextOptionsBuilder<ExaminationSystemDbContext>().UseSqlServer("server=localhost;database=ExaminationDb;uid=root;pwd=root");
            return new ExaminationSystemDbContext(builder.Options); 
        }
    }
}
